home *** CD-ROM | disk | FTP | other *** search
/ Interactive Web Graphics with Shout 3D / Interactive Web Graphics With Shout 3D.iso / mac / Code / Chapter10 / CameraCounter.java < prev    next >
Text File  |  2000-07-14  |  638b  |  30 lines

  1.  
  2. package custom_nodes;
  3.  
  4. import shout3d.core.*;
  5. import shout3d.*;
  6. import java.awt.*;
  7.  
  8.  
  9. public class CameraCounter extends PostRenderEffect{
  10.  
  11.  
  12.  
  13.    final public IntField  number = new IntField(this, "number", Field.NON_NEGATIVE_INT, 1);
  14.  
  15.       
  16.    
  17.    public CameraCounter(){
  18.    
  19.    }
  20.  
  21.    
  22.    public void filter(Graphics g, int surface_pixel_bits[], float z_buffer[], int deviceWidth, int deviceHeight){
  23.    
  24.       String message = "Camera "+ number.getValue();
  25.       g.setFont( new Font("SansSerif", Font.BOLD, 16));
  26.       g.setColor(java.awt.Color.gray);
  27.       g.drawString(message, 20, 20);      
  28.       
  29.    }
  30. }